@model TekFlow.FamilyTree.Models.FamilyTreePart
@using Orchard.Utility.Extensions;
@{
    Script.Require("jQuery").AtHead();
    Script.Include("AntiForgery.js").AtHead();
    Style.Include("FamilyTree.css");
    Script.Include("FamilyTree.js");
}

<div>
<fieldset>
<label>Family Name:</label>  <input type="text" id="ftname" name="FamilyName" value="@Model.FamilyName" />
<label> Image Url:</label>  <input type="text" id="fturl" name="Url" value="@Model.Url" />
<input type="hidden" class="FamilyMemberId" name="FamilyMemberId" value="@Model.FamilyMemberId" />
@if (@Model.FamilyMemberId == 0)
{
<input type="button" value="Begin" onclick="familyTree.createStartTag({
            addUrl: '@Url.Action("AddTag", "Home", new { area = "TekFlow.FamilyTree" })',
            deleteUrl: '@Url.Action("DeleteTag", "Home", new { area = "TekFlow.FamilyTree" })',
            startUrl: '@Url.Action("StartingTags", "Home", new { area = "TekFlow.FamilyTree" })',
            edit: true
        })" />
}
else
{
<script type="text/javascript">
    $(document).ready(function(){
        familyTree.init({ Id: @Model.FamilyMemberId, url: "@Model.Url", name: "@Model.FamilyName", x: 0, y: 0 },
         {
            addUrl: '@Url.Action("AddTag", "Home", new { area = "TekFlow.FamilyTree" })',
            deleteUrl: '@Url.Action("DeleteTag", "Home", new { area = "TekFlow.FamilyTree" })',
            startUrl: '@Url.Action("StartingTags", "Home", new { area = "TekFlow.FamilyTree" })',
            edit: true
        }
        );    
    }); 
</script> 
}
</fieldset>
</div>
<div class="FamilyTree"></div>

<br />
<span>Hint Images are normally stored in /Media/Default/{FolderName}/{PhotoName}.jpg</span>


